<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="">
</head>
<body>
	<script type="text/javascript">
		class Div{
			constructor(x,y){
				this.x = x;//共享属相
				this.y = y;
			}

			move(){
				console.log('动起来');
			}
		}

		console.dir(Div);
		const [div1,div2] = [new Div(10,20),new Div(15,20)];
		div1.z = 30;
		const [d1,d2] = [new Date(),new Date()];
		console.log(
			typeof Div,
			Div.prototype.constructor === Div,
			//div1.__proto__ === Div.prototype,
			Object.getPrototypeOf(div1) === Div.prototype,//
			Object.getPrototypeOf(div1) === Object.getPrototypeOf(div1),
			div1 instanceof Div,//div1 是Div的实例
			div1.constructor === Div, //div1找打的生父，
			Object.getOwnPropertyNames(div1),//找到实例身上自己的属性
			div1.hasOwnProperty('x'),
			div1.hasOwnProperty('move'), //false
			Object.keys(Div)

		);

		console.log(
			typeof Date(),
			Date.prototype.constructor === Date,
			d1.__proto__ === Date.prototype,
			Object.getPrototypeOf(d1) === Object.getPrototypeOf(d1),
			d1 instanceof Date,
			d1.constructor === Date
		);

		//ES5定义的方法是可以被枚举的
		const MyDiv = class my{};
		console.dir(MyDiv);
	</script>
</body>
</html>